﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GGFW.Utils.Constants
{
    /// <summary>
    /// 业务逻辑层公用工具类
    /// </summary>
    public class CommonUtil
    {
        /// <summary>
        /// 封装异常信息到操作结果对象
        /// </summary>
        /// <param name="result">操作结果对象</param>
        /// <param name="ex">异常</param>
        public static void SealExceptionToFoothillResult(Foothill.Utils.ResultBase result, Exception ex)
        {
            result.Success = false;
            result.Message = ex.Message;
            result.AddErrorDetail((int)ErrorCode.ERROR_EXCPETION, ex.Message);
        }
    }
}
